#ifndef ITEMBOOL_H
#define ITEMBOOL_H


#include "config/ConfigItem.h"


class ItemBool : public ConfigItem {
    Q_OBJECT
public:

    bool get()
    {
        return m_data;
    }
    void set(const bool &value)
    {
        m_data = value;
        emit itemEdited();
    }
protected:
    QWidget *createWidget(WidgetStyle s = WidgetStyle::Default) override;
    void update(QWidget *widget, UpdateOption option) override;
    void writeToData(QDataStream &stream) const override;
    void readFromData(QDataStream &stream) override;
private:
    bool m_data = false;
};

#endif // ITEMBOOL_H
